#include<iostream>
using namespace std;
int main(){
    long long a[30]={0,1};
    int n;
    while (cin>>n)
    {
        for(int i=2;i<=n;i++){
            a[i]=a[i-1]+a[i-2];
        }
        cout<<a[n]<<endl;
    }
    
}